package com.byb.server.repository;

import com.byb.server.domain.ProductDetails;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface ProductDetailsRepository extends JpaRepository<ProductDetails,Long> {

    @Query("select productDetails from ProductDetails productDetails left join fetch  productDetails.otherSafeguard2nds " +
        "left join fetch  productDetails.expertOpinionSet where productDetails.id =:id")
    ProductDetails findById(@Param("id") Long id);
}
